<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <!-- lazy修饰符，只有解除聚焦搜索或敲回车的时候实现双向绑定！ -->
    <!-- <div id="app">
        <input type="text" v-model.lazy='message'>
        <h2>{{message}}</h2>
    </div> -->

    <!-- number修饰符，直接转换为number，否则的话就是string -->
    <!-- <div id="app">
        <input type="number" v-model.number="age">
        <h2>{{age}} {{typeof age}}</h2>

    </div> -->

    <!-- trim修饰符，去掉多余的空格 -->
    <div id="app">
        <input type="text" v-model.trim="message">
    </div>
    
    <script src="../vue.js"></script>
    <script>
        const app =new Vue({
            el: '#app',
            data: {
                message: 'hello',
                age: ''
            }
        })
    </script>
</body>
</html>